//
//  WMESearchTableViewCell.m
//  WMEMusic
//
//  Created by 恩叔 on 16/5/9.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMESearchTableViewCell.h"

@interface WMESearchTableViewCell ()

@end

@implementation WMESearchTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.songName = [[UILabel alloc] init];
        _songName.font = [UIFont systemFontOfSize:19];
        [self.contentView addSubview:_songName];
        
        self.author = [[UILabel alloc] init];
        _author.font = [UIFont systemFontOfSize:13];
        [self.contentView addSubview:_author];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    WS(ws);
    [_songName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(ws.mas_left).with.offset(10);
        make.top.equalTo(ws.mas_top).with.offset(10);
        make.width.equalTo(@(WIDTH - 20));
        make.height.equalTo(@(25));
    }];
    
    [_author mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(ws.mas_left).with.offset(10);
        make.top.equalTo(_songName.mas_bottom).with.offset(5);
        make.width.equalTo(@(WIDTH - 20));
        make.height.equalTo(@15);
    }];
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
